<!DOCTYPE html>
<html>
<head>
<title>{$site_name}</title>
<meta name="keywords" content="{$site_seo_keywords}" />
<meta name="description" content="{$site_seo_description}">

<tc_include file="Public:head" />
</head>

<body class="body-white" id="top">
	<tc_include file="Public:nav" />

		<div class="container tc-main">
                <div class="row">
                    <div class="span3">
	                    <tc_include file="Public:usernav"/>
                    </div>
                    <div class="span9">
                           <div class="tabs">
                               <ul class="nav nav-tabs">
                                   <li class="active"><a href="#one" data-toggle="tab"><i class="fa fa-lock"></i> 添加{$taskname}任务</a></li>
                               </ul>
                               <div class="tab-content">
                                  
                                   <div class="tab-pane active" id="one">


<form class="form-horizontal J_ajaxForm" action="{$url}" method="post">
<if condition="$typeid eq 1">
<div class="control-group">
	
	<label class="control-label" for="input-user_url">选择公众号</label>
	<div class="controls">
		<select name="tasktitle">
			<volist name="pubdata" id="vo">
				<option value="{$vo.id}">{$vo.pwc_name}</option>
			</volist>
		</select>
	</div>
</div>
<else />
<div class="control-group">
	<label class="control-label" for="input-user_url">文章浏览网址</label>
	<div class="controls">
		<input type="text" value="" name="tasktitle" class="span3" />
		<input type="hidden" value="2" name="typeid" />
	</div>
</div>

<div class="control-group">
	<label class="control-label" for="input-user_url">文章标题</label>
	<div class="controls">
		<input type="text" value="" name="title" class="span3" />
		
	</div>
</div>


	</if>


<div class="control-group">
	<label class="control-label" for="input-user_url">奖励积分设置</label>
	<div class="controls">
		<input type="text" name="reward" id="reward" value="20"  class="span3"> 1-300分之间。奖励积分越多，任务被完成越多、越快。	
	</div>
</div>
<div class="control-group">
	<label class="control-label" for="input-user_url">任务积分</label>
	<div class="controls">
		<input type="text" name="integration" id="integration" class="span3" disabled="disabled" >任务每被执行一次扣除{$beilu}倍奖励积分。	
	</div>
</div>

<div class="control-group">
	<label class="control-label" for="input-user_url">任务执行次数</label>
	<div class="controls">
		<input type="text" name="tasknum" class="span3">次，当前已完成 0 次。达到目标则自动停止，0为不限制。	
	</div>
</div>

<div class="control-group">
	<label class="control-label" for="input-user_url">任务状态</label>
	<div class="controls">
		<select name="status">
			<option value="1">运行</option>
			<option value="2">停止</option>
		</select>一有积分自动运行任务
	</div>
</div>


<div class="control-group">
	<div class="controls">
		<button type="submit" class="btn J_ajax_submit_btn">保存</button>
	</div>
</div>


</form>

          
                                   </div>
                               </div>							
                           </div>
                    </div>
                </div>

		<tc_include file="Public:footer" />

	</div>
	<!-- /container -->

	<tc_include file="Public:scripts" />
	<script type="text/javascript">
		var reward="{$beilu}";
		$("#reward").keyup(function(){
			var rval=parseInt($(this).val());
			if(rval<1||isNaN(rval)){rval=1;}
			var result=Math.ceil(parseFloat(reward)*rval);
			$("#integration").val(result);
		});
		$("#reward").keyup();
	</script>
	
	
</body>
</html>
